<template>
  <h2>{{ title }}</h2>
</template>

<script>

export default {
  data() {
    return {
      title: ''
    }
  },
  watch: {
    $route() {
      this.title = this.$route.matched[2].meta.title
    }
  },
  created() {
    this.title = this.$route.matched[2].meta.title
  }
}
</script>

<style lang="scss" scoped>
  h2 {
    margin: 20px;
    font-size: 20px;
  }
</style>
